import os
import sys
parent_path = os.path.dirname(sys.path[0])
if parent_path not in sys.path:
    sys.path.append(parent_path)
from _code import getLogger

def main():
    class Config:
        pass
    cfg = Config()
    cfg.mode = 'train'
    cfg.logf = str(os.path.join(parent_path, 't', 'train_log.txt'))
    cfg.debug = True
    log = getLogger(cfg)
    log.info('train log')

    cfg.mode = 'test'
    cfg.logf = str(os.path.join(parent_path, 't', 'test_log.txt'))
    cfg.debug = True
    log = getLogger(cfg)
    log.info('test log')
    log = getLogger(cfg)


if __name__ == "__main__":
    main()
